package com.itbooking.core.mybatisPlus;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

@Component
public class MybatisMetaObjectHandler implements MetaObjectHandler {


    @Override
    public void insertFill(MetaObject metaObject) {
        //boolean isdelete = metaObject.hasSetter("isdelete");
    }


    @Override
    public void updateFill(MetaObject metaObject) {
       /* Object updateTime = getFieldValByName("updatetime", metaObject);
        if (updateTime == null) {
            // updateTime 是实体的属性名
            setFieldValByName("updatetime", new Date(), metaObject);
        }*/
    }
}
